
C = 20;

sigma = .5;
rho = .7;
SigmaInd = sigma.^2 .* [1 rho; rho 1];
ZInd = mvnrnd([0.5 0.5], SigmaInd, C);
Clients = exp(ZInd).*35;

XDist = zeros(C, C);
for i=1:C
    for j=1:C
        XDist(j,i) = sqrt((Clients(i,1) - Clients(j,1))^2 + ...
            (Clients(i,2) - Clients(j,2))^2);  
    end
end
Costs = XDist;

cities = 1:C;
cities = cities(randperm(length(cities)));

initialCost = cost(cities, Costs);
[c resultCities] = tsp(cities,2000,0.5,100,1,Costs);

plotcities(Clients(cities',:)')
plotcities(Clients(resultCities',:)')
